package Java道题;

import java.util.Scanner;

public class Test_3v {
	static public void out(String in) {
		float acount=0;
		float count=1;
		double cout=1;
		for(int i=0;i<in.length()-1;i++) {

			for(int j=i+1;j<in.length();j++) {
				if(in.charAt(j)==in.charAt(i)) {
					count++;
				}
				else {
					i=j;
					acount+=count;
					count=1;
					cout++;
					break;
				}
			}
			if(i==in.length()-1) {
				acount+=count;
				break;
			}

		}

		System.out.println(cout);
		System.out.println(String.format("%.2f",acount/cout) );
	}



	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc=new Scanner(System.in);
		String n=sc.next();
		out(n);
	}

}
